package com.example.facecompare.user.section.table.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.facecompare.common.tool.result.Result;
import com.example.facecompare.user.position.table.entity.PositionTable;
import com.example.facecompare.user.section.table.entity.SectionTable;
import com.example.facecompare.user.section.table.mapper.SectionTableMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tbb
 * @since 2023-08-07
 */
@RestController
@RequestMapping("/section/table")
public class SectionTableController {

    @Autowired
    private SectionTableMapper sectionTableMapper;

    @GetMapping("/id/get/all/")
    private Result IdGetAllInfo(@RequestParam("cid") String cid){
        QueryWrapper<SectionTable> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("cid",cid);
        return Result.success(sectionTableMapper.selectList(queryWrapper));
    }
}
